class AlertRule < ApplicationRecord
  # category Index、Block、Stock
  # metric：close、open、change、flow
  # condition + - * > <

  scope :enabled, -> { where(is_enabled: true) }

  def self.ransackable_associations(auth_object = nil)
    ["stock"]
  end
  def self.ransackable_attributes(auth_object = nil)
    ["category", "condition", "created_at", "description", "frequency", "id", "is_enabled", "level", "name", "threshold", "updated_at"]
  end
end
